import {rolelist} from '../../../request/api'
const state = {
    roleList:[]
}

const getters={
    getRole(state){
        return state.roleList
    }
}

const mutations = {
    CHANGE(state,payload){
        state.roleList = payload
    }
}

const actions = {
    GetRoleInfo ({commit}){
        rolelist()
        .then(res=>{
            commit('CHANGE',res.list)
        }) 
    }

}

export default {
state,getters,mutations,actions,
// 开启命名空间
namespaced:true
}